﻿using System.Reflection;

namespace Mbs.Reflection
{
    public delegate object ConstructorHandler(params object[] arguments);

    public static class CounstructorExtensions
    {
        public static object FastInvoke(this ConstructorInfo constructor, object[] args)
        {
            if (args == null) args = new object[0];

            return DynamicMethodFactoryProxy.Instance.CreateConstructorMethod(constructor)(args);
        }
    }

}
